//
//  WXSActivityView.h
//  SleepBooks
//
//  Created by rimi on 16/9/12.
//  Copyright © 2016年 rimi. All rights reserved.
//

#import <UIKit/UIKit.h>

@class ButtonView;
@class WXSActivityView;

typedef void(^ButtonViewHandler)(ButtonView *buttonView);

@interface ButtonView : UIView
@property (strong, nonatomic) UILabel *textLabel;
@property (strong, nonatomic) UIButton *imageButton;
@property (weak, nonatomic) WXSActivityView *activityView;

- (id)initWithText:(NSString *)text image:(UIImage *)image handler:(ButtonViewHandler)handler;
@end

@interface WXSActivityView : UIView
@property (strong, nonatomic) UIColor *bgColor;
@property (strong, nonatomic) UILabel *titleLabel;
@property (strong, nonatomic) UIButton *cancelButton;
@property (assign, nonatomic) int numberOfButtonPerLine;
//是否可以通过下滑手势关闭视图, 默认为YES
@property (assign, nonatomic) BOOL userGestuer;
//是否正在显示
@property (getter=isShowing, nonatomic) BOOL show;

- (id)initWithTitle:(NSString *)title referView:(UIView *)referView;

- (void)addButtonView:(ButtonView *)buttonView;

- (void)show;

- (void)hide;

@end
